﻿using System;

namespace Microsoft.Popfly.GameCreator.GameEngine.Behaviors
{
    public class ReverseBehavior : IBehavior
    {
        private IReverseableMotion m_behaviorToReverse;

        public ReverseBehavior(MotionBehavior moveBehavior)
        {
            m_behaviorToReverse = moveBehavior;
        }
        #region IBehavior Members

        public void Invoke(BehaviorOwner sender, Microsoft.Popfly.GameCreator.GameEngine.Events.PGCEventArgs args)
        {
            m_behaviorToReverse.Reverse();
        }

        #endregion
    }
}
